<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/pintuer.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/admin.css">
<script src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script src="${pageContext.request.contextPath}/js/pintuer.js"></script>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/toastr.css">
<script src="${pageContext.request.contextPath}/js/toastr.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function(){
	$(".changeInform").click(function(){
		var title = $("#title").val();
		var content = $("#content").val();
		$.ajax({
			type:"POST",
			data:{"title":title,"content":content},
			url:"/BookStoreManager/changeBriefIntroduce",
			success:function(data){
				if(data.result=="修改成功"){
					toastr.options.positionClass = 'toast-center-center'
						toastr.success("修改成功");
				}
				else if(data.result="修改失败"){
					toastr.options.positionClass = 'toast-center-center'
						toastr.error("修改失敗");
				}
				else{
					alert("unkown erro");
				}
			}
		})
		return false;
	})
	
})
</script>
<div class="panel admin-panel">
  <div class="body-content">
    <form method="post" class="form-x" enctype="multipart/form-data" action="${pageContext.request.contextPath}/manager/changeNotify"  name="fileUploadForm">  
      <div class="form-group">
        <div class="panel-head">
			<strong><span class="icon-pencil-square-o"></span> 修改学校简介</strong>
		</div>
	    <div style="margin-bottom: 50px;" >
	       <h1 style="text-align: center;margin-top: 12px;"><c:out value="${info.title}"></c:out> </h1>
	       <p style="font-size: 14px;clear:right; margin: 20px;"><c:out value="${info.content}"></c:out></p>
	       <p style="font-size: 14px;float:right; margin: 20px;"><c:out value="${info.date}"></c:out></p>
	    </div>
         
      </div>     
      <div class="form-group">
        <div class="label">
          <label>修改：</label>
        </div>
        <div class="field">
          <textarea class="input" id="content" name="content" style=" height:300px;"></textarea>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>标题：</label>
        </div>
        <div class="field">
          <input type="text" id="title" class="input w50" value="" name="title"  data-validate="required:请输入标题" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o changeInform" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body>
</html>